c# ef dynamic ApplyConfiguration

83

c# ef dynamic ApplyConfiguration -

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
   base.OnModelCreating(modelBuilder);

   modelBuilder.ApplyConfigurationsFromAssembly(typeof(UserConfiguration).Assembly); // Here UseConfiguration is any IEntityTypeConfiguration
}

Comments

Submit
0 Comments